package com.elock.service;

import java.util.List;
import java.util.Map;

import org.springframework.web.multipart.MultipartFile;

import com.elock.base.core.Page;
import com.elock.base.core.Pageable;
import com.elock.base.core.service.BaseService;
import com.elock.entity.Terminal;

/**
 * 终端设备
 * @author 仁德
 */
public interface TerminalService extends BaseService<Terminal> {

	/**
	 * 保存终端设备
	 * @param terminal
	 * @param saleOrgId
	 */
	public void save(Terminal terminal, Long saleOrgId, Long[] memberId);

	/**
	 * 更新终端设备
	 * @param terminal
	 * @param saleOrgId
	 */
	public void update(Terminal terminal, Long saleOrgId, Long[] memberId);

	public Page<Map<String, Object>> findPage(String terminalNum, String terminalName,
			Long saleOrgId, String sim, Pageable pageable);

	public List<Map<String, Object>> findTerminalElectronicFenceByTerminalId(
			Long terminalId);

	public Terminal findByCarNumber(String terminalNum);

	public Page<Map<String, Object>> findTerminalMonitorPage(String terminalNum,
			String sim, Long saleOrgId, String startTime, String endTime,
			Pageable pageable);

	public Integer countTerminalMonitor(String terminalNum, String sim, Long saleOrgId,
			String startTime, String endTime, Pageable pageable, Integer page,
			Integer size);

	public List<Map<String, Object>> findTerminalMonitorList(String terminalNum,
			String sim, Long saleOrgId, String startTime, String endTime,
			Pageable pageable, Integer page, Integer size);

	public Integer countTerminalList(String terminalNum, String terminalName,
			Long saleOrgId, String sim, Pageable pageable, Integer page, Integer size);

	public List<Map<String, Object>> findTerminalList(String terminalNum,
			String terminalName, Long saleOrgId, String sim, Pageable pageable,
			Integer page, Integer size);

	public String terminalImport(MultipartFile multipartFile) throws Exception;
}
